package com.qc.serviceedu.controller;

import com.qc.commonutils.result.R;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

//@CrossOrigin //跨域
@RestController
@RequestMapping("/eduservice/user")
@ApiModel(value = "登录管理")
public class EduLoginController {

    //login
    @PostMapping("login")
    @ApiOperation(value = "登录")
    public R login(){
        return R.ok().data("token","admin");
    }

    //info
    @GetMapping("info")
    @ApiOperation(value = "登录")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avater","https://image1.suning.cn/uimg/cms/img/159642507148437980.png");
    }
}
